home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / lisp / x11 / x-scrollbar.el < prev    next >
Encoding:
Text File  |  1995-06-01  |  2.6 KB  |  70 lines

  1. ;;; x-scrollbar.el --- scrollbar resourcing and such.
  2.  
  3. ;;; Copyright (C) 1995 Sun Microsystems.
  4.  
  5. ;; Author: Ben Wing <wing@netcom.com>
  6.  
  7. ;; This file is part of XEmacs.
  8.  
  9. ;; XEmacs is free software; you can redistribute it and/or modify it
  10. ;; under the terms of the GNU General Public License as published by
  11. ;; the Free Software Foundation; either version 2, or (at your option)
  12. ;; any later version.
  13.  
  14. ;; XEmacs is distributed in the hope that it will be useful, but
  15. ;; WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  17. ;; General Public License for more details.
  18.  
  19. ;; You should have received a copy of the GNU General Public License
  20. ;; along with XEmacs; see the file COPYING.  If not, write to the Free
  21. ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  22.  
  23. (defun x-init-scrollbar-from-resources (locale)
  24.   (x-init-specifier-from-resources
  25.    scrollbar-width 'natnum locale
  26.    '("scrollBarWidth" . "ScrollBarWidth")
  27.    ;; The name strings are wrong, but the scrollbar name is
  28.    ;; non-deterministic so it is a poor way to set a resource
  29.    ;; for the scrollbar anyhow.
  30.    (cond ((featurep 'athena-scrollbars)
  31.       '("scrollbar.thickness" . "ScrollBar.Thickness"))
  32.      ((featurep 'lucid-scrollbars)
  33.       '("scrollbar.width" . "XlwScrollBar.Width"))
  34.      ((featurep 'motif-scrollbars)
  35.       '("scrollbar.width" . "XmScrollBar.Width"))))
  36.   ;; Athena scrollbars accept either 'thickness' or 'width'.
  37.   ;; If any of the previous resources succeeded, the following
  38.   ;; call does nothing; so there's no harm in doing it all the
  39.   ;; time.
  40.   (if (featurep 'athena-scrollbars)
  41.       (x-init-specifier-from-resources
  42.        scrollbar-width 'natnum locale
  43.        '("scrollbar.width" . "ScrollBar.Width")))
  44.       
  45.   ;; lather, rinse, repeat.
  46.   (x-init-specifier-from-resources
  47.    scrollbar-height 'natnum locale
  48.    '("scrollBarHeight" . "ScrollBarHeight")
  49.    ;; The name strings are wrong, but the scrollbar name is
  50.    ;; non-deterministic so it is a poor way to set a resource
  51.    ;; for the scrollbar anyhow.
  52.    (cond ((featurep 'athena-scrollbars)
  53.       '("scrollbar.thickness" . "ScrollBar.Thickness"))
  54.      ((featurep 'lucid-scrollbars)
  55.       '("scrollbar.height" . "XlwScrollBar.Height"))
  56.      ((featurep 'motif-scrollbars)
  57.       '("scrollbar.height" . "XmScrollBar.Height"))))
  58.   ;; Athena scrollbars accept either 'thickness' or 'height'.
  59.   ;; If any of the previous resources succeeded, the following
  60.   ;; call does nothing; so there's no harm in doing it all the
  61.   ;; time.
  62.   (if (featurep 'athena-scrollbars)
  63.       (x-init-specifier-from-resources
  64.        scrollbar-height 'natnum locale
  65.        '("scrollbar.height" . "ScrollBar.Height"))))
  66.  
  67.  
  68.  
  69.  
  70.